﻿<%@ Control Language="VB" %>
<% 
    Dim cps As Integer = DailyReport.DailyReportCommon.CurrentUserPermissions
    
    Dim t = 0
    If (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.一审)) _
     Or (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.二审)) _
     Or (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.三审)) _
     Or (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.审核会签)) _
     Or (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.地价会签)) Then
    Else
        t += 1
        mnCheck.Hide()
        mnCheckReport.Hide()
    End If
    If (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.审核报表)) Then
        't += 1
        'mnCheckReport.Hide()
        mnCheckReport.Text = "部门审核报表"
    End If
    If t >= 1 Then  'If t >= 2 Then
        acCheck.Hide()
    End If
    
    t = 0
    If Not (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.评估工作报告)) Then
        t += 1
        mnAssess.Hide()
    End If
    If Not (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.评估报表)) Then
        t += 1
        mnAssessReport.Hide()
    End If
    If t >= 2 Then
        acAssess.Hide()
    End If
    
    t = 0
    If Not (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.总收发工作报告)) Then
        t += 1
        mnTransceiver.Hide()
    End If
    If Not (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.总收发报表)) Then
        t += 1
        mnTransceiverReport.Hide()
    End If
    If t >= 2 Then
        acTransceiver.Hide()
    End If
    
    If Not (DailyReport.DailyReportCommon.MatchingPermission(cps, DailyReport.DailyReportCommon.PermissionList.系统设置)) Then
        acSystem.Hide()
    End If
       
%>
<ext:AccordionLayout ID="AccordionLayout1" runat="server" Animate="true">
    <Items>
        <ext:MenuPanel ID="acCheck" runat="server" Border="false" SaveSelection="false" Cls="white-menu"
            Collapsed="false" Title="审核" Icon="Report">
            <Menu ID="WestMenu2" runat="server">
                <Items>
                    <ext:MenuItem ID="mnCheckReport" runat="server" Text="审核报表" Icon="Report">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Day/DepartmentCheckReport/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                    <ext:MenuItem ID="mnCheck" runat="server" Text="个人日审核报告" Icon="Report">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Day/CheckList/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                </Items>
                <Listeners>
                    <ItemClick Handler="DailyReport.addTab({ title: menuItem.text, url: menuItem.url, icon: menuItem.iconCls, passParentSize: menuItem.passParentSize});" />
                </Listeners>
            </Menu>
        </ext:MenuPanel>
        <ext:MenuPanel ID="acAssess" runat="server" Border="false" SaveSelection="false"
            Cls="white-menu" Collapsed="false" Title="评估" Icon="Report">
            <Menu ID="WestMenu1" runat="server">
                <Items>
                    <ext:MenuItem ID="mnAssessReport" runat="server" Text="评估工作任务完成情况一览表" Icon="Report">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Assess/AssessReport/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                    <ext:MenuItem ID="mnAssess" runat="server" Text="评估报告工作表" Icon="ReportAdd">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Assess/AssessList/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                </Items>
                <Listeners>
                    <ItemClick Handler="DailyReport.addTab({ title: menuItem.text, url: menuItem.url, icon: menuItem.iconCls, passParentSize: menuItem.passParentSize});" />
                </Listeners>
            </Menu>
        </ext:MenuPanel>

        <ext:MenuPanel ID="acTransceiver" runat="server" Border="false" SaveSelection="false"
            Cls="white-menu" Collapsed="false" Title="总收发" Icon="Report">
            <Menu ID="Menu1" runat="server">
                <Items>
                    <ext:MenuItem ID="mnTransceiverReport" runat="server" Text="总收发工作报表" Icon="Report">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Transceiver/TransceiverReport/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                    <ext:MenuItem ID="mnTransceiver" runat="server" Text="总收发日工作报告" Icon="ReportAdd">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Transceiver/TransceiverList/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                </Items>
                <Listeners>
                    <ItemClick Handler="DailyReport.addTab({ title: menuItem.text, url: menuItem.url, icon: menuItem.iconCls, passParentSize: menuItem.passParentSize});" />
                </Listeners>
            </Menu>
        </ext:MenuPanel>
        <ext:MenuPanel ID="acSystem" runat="server" Border="false" SaveSelection="false"
            Cls="white-menu" Collapsed="false" Title="系统" Icon="Cog">
            <Menu ID="WestMenu3" runat="server">
                <Items>
                    <ext:MenuItem ID="mnUser" runat="server" Text="用户管理" Icon="User">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Account/UserList/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>
                    <%--<ext:MenuItem ID="mnDepartment" runat="server" Text="部门管理" Icon="Group">
                        <CustomConfig>
                            <ext:ConfigItem Name="url" Value="/Account/DepartmentList/" Mode="Value" />
                        </CustomConfig>
                    </ext:MenuItem>--%>
                </Items>
                <Listeners>
                    <ItemClick Handler="DailyReport.addTab({ title: menuItem.text, url: menuItem.url, icon: menuItem.iconCls, passParentSize: menuItem.passParentSize});" />
                </Listeners>
            </Menu>
        </ext:MenuPanel>
    </Items>
</ext:AccordionLayout>
